#include "./mystring.hpp"


int main(int argc, char const *argv[]) {
  
  mystring::MyString str1("Hu");
  
  std::cout << str1 << std::endl;
  std::cout << str1.size() << std::endl;
  std::cout << str1[0] << std::endl;

  mystring::MyString str2 = str1; // 拷贝构造
  std::cout << str2 << std::endl;

  mystring::MyString str3("Mingdong");
  std::cout << str3 << std::endl;
  std::cout << str3.size() << std::endl;
  std::cout << str3[1] << std::endl;

  std::cout << "-----------" << std::endl;
  // 相加
  std::cout << str1 + str3 << std::endl;

  mystring::MyString new_str;
  std::cin >> new_str;
  std::cout << new_str << std::endl;
  std::cout << new_str.size() << std::endl;

  return 0;
}
